import Vue from "vue";
import VueRouter from "vue-router";
import Paymentfront from "../views/Paymentfront/index.vue"; //支付前路由  张恒康
import Paymentway from "../views/Paymentway/index.vue"; //支付中选择支付方式路由  张恒康
import Paymentmiddle from "../views/Paymentmiddle/index.vue"; //支付中填写密码路由  张恒康
import Paymentok from "../views/Paymentok/index.vue"; //支付成功路由  张恒康
import Shoppingcar from "../views/Shoppingcar/index.vue"; //购物车路由  张恒康
import Home from "../views/Home/index.vue"; //首页
import Classfiy from "../views/Classfiy/index.vue"; //分类
import My from "../views/My/index.vue"; //我的
import Layout from '../Layout/index.vue'
import login from '../views/login.vue'
import Balace from '../views/My/balace/index.vue'
import BankCard from "../views/My/balace/bankCard/index.vue"//银行卡
import BankBinding from "../views/My/balace/BankBinding/index.vue"//银行卡绑定
import VerificationCode from "../views/My/balace/VerificationCode/index.vue"//验证码
import SecondaryAddBank from "../views/My/balace/SecondaryAddBank/index.vue"//二次添加银行卡
import Consumption from "../views/My/balace/consumption/index.vue"
import Recharge from '../views/My/balace/recharge/Recharge.vue'//充值未绑卡

import Recharge1 from '../views/My/balace/recharge1/recharge.vue'//充值未绑卡
import ShippingAddress from "../views/ShippingAddress/index.vue"//收货地址
Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    redirect: "/login",
  },
  {
    path: "/layout",
    name: "Layout",
    component: Layout,
    children: [
      {
        path: "/layout/home",
        name: "Home",
        component: Home,
      },
      {
        path: "/layout/classfiy",
        name: "Classfiy",
        component: Classfiy,
      },
      {
        path: "/layout/my",
        name: "My",
        component: My,
      },
      
      {
        path: "/layout/shoppingcar", //购物车路由  张恒康
        name: "Shoppingcar",
        component: Shoppingcar,
      },
    ],
  },
  {
    path: "/layout/my/balace",//余额
    name: "Balace",
    component: Balace,
  },
  
  {
     path:'/consumption',//消费记录
     name:'Consumption',
     component:Consumption
  },
  {
    path:'/recharge',//充值未绑卡
    name:'Recharge',
    component:Recharge
  },
  {
    path:'/recharge1',//充值已绑卡
    name:'Recharge1',
    component:Recharge1
  },
  {
    path: "/paymentfront", //支付前路由  张恒康
    name: "Paymentfront",
    component: Paymentfront,
  },
  {
    path: "/paymentway", //支付中选择支付方式路由  张恒康
    name: "Paymentway",
    component: Paymentway,
  },
  {
    path: "/paymentmiddle", //支付中填写密码路由  张恒康
    name: "Paymentmiddle",
    component: Paymentmiddle,
  },
  {
    path: "/paymentok", //支付成功路由  张恒康
    name: "Paymentok",
    component: Paymentok,
  },
  {
    path: "/shoppingcar", //购物车路由  张恒康
    name: "Shoppingcar",
    component: Shoppingcar,
  },
  {
    path: '/login',
    name: 'login',
    component: login
  },
  {
    path: '/reg',
    name: 'reg',
    component: () => import('../views/reg.vue')
  },
  {
    path: '/seckill',//秒杀
    name: 'seckill',
    component: () => import('../views/seckill.vue')
  },
  {
    path: '/change_pwd',
    name: 'change_pwd',
    component: () => import('../views/change_pwd.vue')
  },
  //砍价
  {
    path: '/bargain',
    name: 'Bargain',
    component: () => import('../views/bargain/index.vue')
  },
  {
    path:'/shippingAddress',//收货地址
    name:'ShippingAddress',
    component:ShippingAddress
  },
  {
    path:'/bankCard',
    name:'BankCard',
    component:BankCard//银行卡
  },
  {
    path:'/bankBinding',
    name:'BankBinding',
    component:BankBinding//银行卡绑定
  },
  {
    path:'/verificationCode',//验证码
    name:'VerificationCode',
    component:VerificationCode
  },
  {
    path:'/SecondaryAddBank',//二次添加银行卡
    name:'SecondaryAddBank',
    component:SecondaryAddBank
  },
  {
    path: '/examine',
    name: 'examine',
    component: () => import('../views/examine/index.vue')
  },
  {
    path: '/cheapDetail',
    name: 'cheapDetail',
    component: () => import('../views/cheapDetail/index.vue')
  },
  {
    path: '/wx',
    name: 'wx',
    component: () => import('../views/wx/index.vue')
  },
  {
    path: '/weix',
    name: 'weix',
    component: () => import('../views/weix/index.vue')
  },
  {
    path: '/write',
    name: 'write',
    component: () => import('../views/write/index.vue')
  },
  {
    path: '/streaming',//直播特卖
    name: 'streaming',
    component: () => import('../views/streaming/index.vue')
  },
  {
    path: '/radio',//直播
    name: 'radio',
    component: () => import('../views/streaming/radio/index.vue')
  }

];

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes,
});

export default router
